﻿using EasyLinkerSDK.Enum;
using EasyLinkerSDK.Model.Client.Common.Interface;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace EasyLinkerSDK.Model.Client.Msg
{
    public class Msg : IClientMessage
    {
        [JsonConverter(typeof(StringEnumConverter))]
        public DeviceType Device { get; set; }

        public string Uid { get; set; }

        public string Key { get; set; }

        [JsonConverter(typeof(StringEnumConverter))]
        public ProtocolType ProtocolType { get; set; }

        [JsonConverter(typeof(StringEnumConverter))]
        public MessageType Type { get; set; }

        [JsonConverter(typeof(StringEnumConverter))]
        public ActionName Action { get; set; }

        public string MessageId { get; set; }

        public string DeviceId { get; set; }

        public int Time { get; set; }

        public MsgData Data { get; set; }
    }
}
